<template>
	<view class="container">
		支付
	</view>
</template>
</template>

<script>
	export default {
		data() {
			return {}
		}
	},
	onLoad() {},
		methods: {
			goWxPay() {
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						"appId": res.pid.appId,
						"nonceStr": res.pid.nonceStr,
						"package": res.pid.package,
						"paySign": res.pid.paySign,
						"signType": res.pid.signType,
						"timeStamp": res.pid.timeStamp
					},
					function(ress) {
						if (ress.err_msg == "get_brand_wcpay_request:ok") {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							})
							that.subscription = 1
						} else if (ress.err_msg == "get_brand_wcpay_request:cancel") {
							uni.showToast({
								icon: "none",
								title: "已取消支付"
							})
						} else {
							uni.showToast({
								icon: "none",
								title: "支付失败"
							})
						}
					}
				)
			}
		}
	}
</script>